//
//  CGDrawing.h
//  Racing
//
//  Created by vy phan on 4/15/11.
//  Copyright 2011 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "cocos2d.h"
//1. Created a blank bitmap
//2. Draw shape into this bitmap
//3. Created a Texture2D from the bitmap
//4. Set a sprite's texture to this new texture.

@interface CGDrawing : NSObject {
	UIImage* DrawingImage;
	CGContextRef DrawingBitmap;
	CCSprite* DrawingSprite;
	CCTexture2D* DrawingTexture; 
}
//1. Created a blank bitmap
#ifdef USE_CGDRAWING
CGContextRef CreateDrawingBitmapContext(int pixelsWide, int pixelsHigh);
-(CCSprite*) drawingArc;
-(CCSprite*) drawingRectWithX:(int)x_ Y:(int)y_ Width:(int)width_ Height:(int)height_;
#endif
-(void) drawingLineWithContext:(CGContextRef)context StartPoint:(CGPoint)start EndPoint:(CGPoint)end;
-(void) drawingRectWithContext:(CGContextRef)context X:(int)x_ Y:(int)y_ Width:(int)width_ Height:(int)height_;
-(void) drawingArcWithContext:(CGContextRef)context X1:(CGPoint)point1 X2:(CGPoint)point2 X3:(CGPoint)point3 Radius:(CGFloat)radius;
-(void) drawingPolyWithContext:(CGContextRef)context xVertices:(NSMutableArray*)xVertices yVertices:(NSMutableArray*)yVertices;
@end
